package com.yy.okhttp;

import java.util.HashMap;
import java.util.Map;

/**
 * User: gongyongfeng2@yy.com
 * Date: 2020/7/29 14 :44
 */
public class Response {
    int code;
    int contentLength = -1;
    Map<String, String> header = new HashMap<>();
    String body;
    boolean isKeepAlive;

    public Response(int code, int contentLength,
                    Map<String, String> header, String body, boolean isKeepAlive) {
        this.code = code;
        this.contentLength = contentLength;
        this.header = header;
        this.body = body;
        this.isKeepAlive = isKeepAlive;
    }

    public int getCode() {
        return code;
    }

    public int getContentLength() {
        return contentLength;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public String getBody() {
        return body;
    }

    public boolean isKeepAlive() {
        return isKeepAlive;
    }
}
